package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DuchehongbaoMapper;
import com.ruoyi.system.domain.Duchehongbao;
import com.ruoyi.system.service.IDuchehongbaoService;
import com.ruoyi.common.support.Convert;

/**
 * 堵车红包 服务层实现
 * 
 * @author ruoyi
 * @date 2019-07-16
 */
@Service
public class DuchehongbaoServiceImpl implements IDuchehongbaoService 
{
	@Autowired
	private DuchehongbaoMapper duchehongbaoMapper;

	/**
     * 查询堵车红包信息
     * 
     * @param duchehongbaoId 堵车红包ID
     * @return 堵车红包信息
     */
    @Override
	public Duchehongbao selectDuchehongbaoById(Integer duchehongbaoId)
	{
	    return duchehongbaoMapper.selectDuchehongbaoById(duchehongbaoId);
	}
	
	/**
     * 查询堵车红包列表
     * 
     * @param duchehongbao 堵车红包信息
     * @return 堵车红包集合
     */
	@Override
	public List<Duchehongbao> selectDuchehongbaoList(Duchehongbao duchehongbao)
	{
	    return duchehongbaoMapper.selectDuchehongbaoList(duchehongbao);
	}
	
    /**
     * 新增堵车红包
     * 
     * @param duchehongbao 堵车红包信息
     * @return 结果
     */
	@Override
	public int insertDuchehongbao(Duchehongbao duchehongbao)
	{
	    return duchehongbaoMapper.insertDuchehongbao(duchehongbao);
	}
	
	/**
     * 修改堵车红包
     * 
     * @param duchehongbao 堵车红包信息
     * @return 结果
     */
	@Override
	public int updateDuchehongbao(Duchehongbao duchehongbao)
	{
	    return duchehongbaoMapper.updateDuchehongbao(duchehongbao);
	}

	/**
     * 删除堵车红包对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDuchehongbaoByIds(String ids)
	{
		return duchehongbaoMapper.deleteDuchehongbaoByIds(Convert.toStrArray(ids));
	}
	
}
